<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<title>客户管理</title>
<%@ include file="/header.jsp" %>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="loginname" @keyup.enter="query" placeholder="用户名称">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<!-- <a class="btn btn-primary" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a> -->
			<a class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
			<a class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>

	<div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}} </div>
		<form class="form-horizontal">
		    <div class="form-group">
				<div class="col-sm-2 control-label">客户编号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="uid" v-model="user.uid"  readonly="readonly" />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">用户名称</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="loginname" v-model="user.loginname"  />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">性别</div>
				<div class="col-sm-10">
					<!-- <input type="text" class="form-control"  v-model="user.sex" /> -->
					<select class="form-control" name="gender" v-model="user.gender">   
                                   <option value="男">男</option>   
                                   <option value="女">女</option>   
                                 </select> 
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">地址</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="address" v-model="user.address"   />
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">手机号</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="phone" v-model="user.phone"   />
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">业务</div>
				<div class="col-sm-10">
					<!-- <input type="text" class="form-control" v-model="user.businessType" /> -->
				    <select class="form-control" name="businessType"  v-model="user.businessType" >   
                                     <option value="奔驰">奔驰</option>   
                                    <option value="宝马">宝马</option> 
                                    <option value="大众">大众</option>   
                                    <option value="劳斯莱斯">劳斯莱斯</option>  
                                    <option value="奥迪">奥迪</option>   
                                    <option value="丰田">丰田</option>  
                                    <option value="本田">本田</option>   
                                    <option value="现代">现代</option>  
                                    <option value="起亚">起亚</option>   
                                    <option value="别克">别克</option>  
                                    <option value="长城">长城</option>   
                                    <option value="马自达">马自达</option>  
                                    <option value="日产">日产</option>   
                                    <option value="路虎">路虎</option>   
                                 </select>
				</div>
			</div>
			
			<div class="form-group">
				<div class="col-sm-2 control-label">备注</div>
				<div class="col-sm-10">
					<input type="text" class="form-control" name="remark"  v-model="user.remark" />
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div>
				<input type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
				&nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>
<script src="<c:url value='/statics/js/modules/sys/customer.js'/>"></script>

</body>
</html>